import { request } from '@api/service'

export const fetchListApi = (params) => {
  return request({
    url: '/carousel/index',
    method: 'get',
    params
  })
}

export const store = (data) => {
  return request({
    url: '/carousel/create',
    method: 'post',
    data
  })
}

export const edit = (id, data) => {
  return request({
    url: `/carousel/create?id=${id}`,
    method: 'post',
    data
  })
}

export const del = (params) => {
  return request({
    url: '/carousel/delete',
    method: 'get',
    params
  })
}
